function [ traits, sites] = collectAllTraits( input )
%UNTITLED Summary of this function goes here
%   Detailed explanation goes here
numCells = size(input, 1);
numSites = size(input, 2);
fprintf('%d cells, %d sites\n', numCells, numSites);

traits = [];
sites = [];
traitIdx = 0;

for i = 1:numSites
    thisSiteStart = traitIdx + 1;
    for j = 1:numCells
        if (input(j, i) ~= 0)
            found = 0;
            for k = thisSiteStart:traitIdx
                if (traits(k, 1) == input(j, i) && sites(k, 1) == i)
                    found = 1;
                    break;
                end
            end
            if (found == 0)
                traitIdx = traitIdx + 1;
                traits(traitIdx, 1) = input(j, i);
                sites(traitIdx, 1) = i;
            end
        end
    end
end

end

